package com.moneylee.xdstudy.mapper;

import com.moneylee.xdstudy.domain.Video;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @className: VideoMapper
 * @Description: TODO
 * @Author moneylee
 * @Date 2020-06-30 16:10
 * @Version 1.0
 **/

@Repository
public class VideoMapper {

    private static Map<Integer, Video> videoMap = new HashMap<>();

    static {
        videoMap.put(1, new Video(1,"老A"));
        videoMap.put(2, new Video(1,"老B"));
        videoMap.put(3, new Video(1,"老C"));
        videoMap.put(4, new Video(1,"老D"));
        videoMap.put(5, new Video(1,"老E"));
        videoMap.put(6, new Video(1,"老F"));
    }


    public List<Video> listVideo(){
        List<Video> videoList = new ArrayList<>();
        videoList.addAll(videoMap.values());
        return videoList;
    }
}
